[
  {
    "description": "JSON with control characters - 'properties' (#226)",
    "schema": {
      "properties": {
        "foo\nbar": { "type": "number" },
        "foo\"bar": { "type": "number" },
        "foo\\bar": { "type": "number" },
        "foo\rbar": { "type": "number" },
        "foo\tbar": { "type": "number" },
        "foo\fbar": { "type": "number" }
      }
    },
    "tests": [
      {
        "description": "object with all numbers is valid",
        "data": {
          "foo\nbar": 1,
          "foo\"bar": 1,
          "foo\\bar": 1,
          "foo\rbar": 1,
          "foo\tbar": 1,
          "foo\fbar": 1
        },
        "valid": true
      },
      {
        "description": "object with strings is invalid",
        "data": {
          "foo\nbar": "1",
          "foo\"bar": "1",
          "foo\\bar": "1",
          "foo\rbar": "1",
          "foo\tbar": "1",
          "foo\fbar": "1"
        },
        "valid": false
      }
    ]
  },
  {
    "description": "JSON with control characters - 'required' (#226)",
    "schema": {
      "required": [
        "foo\nbar",
        "foo\"bar",
        "foo\\bar",
        "foo\rbar",
        "foo\tbar",
        "foo\fbar"
      ]
    },
    "tests": [
      {
        "description": "object with all properties present is valid",
        "data": {
          "foo\nbar": 1,
          "foo\"bar": 1,
          "foo\\bar": 1,
          "foo\rbar": 1,
          "foo\tbar": 1,
          "foo\fbar": 1
        },
        "valid": true
      },
      {
        "description": "object with some properties missing is invalid",
        "data": {
          "foo\nbar": "1",
          "foo\"bar": "1"
        },
        "valid": false
      }
    ]
  },
  {
    "description": "JSON with control characters - 'enum'",
    "schema": {
      "enum": [ "foo\nbar", "foo\rbar" ]
    },
    "tests": [
      {
        "description": "member 1 is valid",
        "data": "foo\nbar",
        "valid": true
      },
      {
        "description": "member 2 is valid",
        "data": "foo\rbar",
        "valid": true
      },
      {
        "description": "another string is invalid",
        "data": "abc",
        "valid": false
      }
    ]
  },
  {
    "description": "JSON with control characters - 'dependencies'",
    "schema": {
      "dependencies": {
        "foo\nbar": [ "foo\rbar" ],
        "foo\tbar": {
          "minProperties": 4
        }
      }
    },
    "tests": [
      {
        "description": "valid object 1",
        "data": {
          "foo\nbar": 1,
          "foo\rbar": 2
        },
        "valid": true
      },
      {
        "description": "valid object 2",
        "data": {
          "foo\tbar": 1,
          "a": 2,
          "b": 3,
          "c": 4
        },
        "valid": true
      },
      {
        "description": "invalid object 1",
        "data": {
          "foo\nbar": 1,
          "foo": 2
        },
        "valid": false
      },
      {
        "description": "invalid object 2",
        "data": {
          "foo\tbar": 1,
          "a": 2
        },
        "valid": false
      }
    ]
  }
]
